package com.rub.android.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.rub.android.R
import com.rub.android.model.ItemsModel


open class ItemsAdapter(layoutResId: Int, data: MutableList<ItemsModel>?) :
    BaseQuickAdapter<ItemsModel, BaseViewHolder>(layoutResId, data) {

    override fun convert(holder: BaseViewHolder, item: ItemsModel) {
        //可链式调用赋值
        holder
            .setText(R.id.tv_title, item.title)
            .setText(R.id.tv_content, item.content)
            .setImageResource(R.id.iv_img, R.drawable.rub)


    }
}